1. Field of the Invention
The present invention relates to a waveform generating apparatus which can be suitably employed in electronic musical instruments.
2. Prior Art
Two types of waveform generating apparatus are conventionally employed as tone generators for electronic musical instruments. In one such apparatus, sample data is stored therein representing various waveforms. To generate a particular pitch having a waveform equivalent to one of the stored waveforms, the corresponding waveform is cyclically read out from memory with a period equal to that of the pitch to be generated. Thus, for each waveform stored in the memory of the waveform generating apparatus, corresponding waveforms can be read out of the device at any desired pitch. Additionally, by carrying out various operations, for example, summing two or more waveforms which differ from those stored in memory can be generated.
In order to accurately control the pitch of a generated waveform, the period over which the waveform is read out from memory must be accurately controlled, generally based on the frequency of a system clock. Furthermore, this kind of waveform generating apparatus presents various design problems associated with the interface between the waveform apparatus and devices connected therewith. As an example, when summing two or more waveforms generated therein having different pitches, the waveforms to be summed will most likely be out of phases with respect to one another, thereby complicating the summing operation.
To solve this problem, another type of waveform generating apparatus has been conventionally employed, wherein sample data is generated in synchronization with a constant period, even as the-pitch of the waveform to be generated varies. Referring to FIGS. 16(a) through 16(e), the operation of this type of waveform generating apparatus will be described. In FIGS. 16(a), 16(c) and 16(d), AW indicates a basic waveform. This basic waveform is sampled over time at a constant sampling interval Tc, which will be referred to hereafter as basic sampling interval Tc. Thus, basic waveform A is sequentially sampled at basic sampling interval Tc, the result of which is stored as sample data in waveform memory.
When the target pitch of a waveform to be generated with this type of apparatus is higher than the pitch of basic waveform AW by an octave or less, the amplitude of basic waveform AW is sequentially determined over time at an interval given by Tm, hereafter referred to as regeneration sampling interval Tm, as indicated by the broken lines in FIG. 16(a), where regeneration sampling interval Tm has a duration greater than basic sampling interval Tc. Data having thus been obtained corresponding to sequential sampling waveform AW at an interval given by regeneration sampling interval Tm, the sample data is then sequentially outputted at an interval given by basic sampling interval Tc, thereby regenerating basic waveform AW as regenerated waveform BW, at a frequency equal to the frequency of basic waveform AW multiplied by Tm/Tc, such that the pitch of the tone corresponding to the regenerated waveform BW is equal to the desired target pitch.
It is frequently the case, however, that the ratio Tm/Tc is not an integral value, for which reason It is ordinarily not possible to read sample data corresponding to sequential sampling of waveform AW at regeneration sampling interval Tm directly from waveform memory with this type of apparatus. To solve this problem, an asynchronous waveform generating apparatus including an interpolating circuit is employed, whereby calculations are performed using the data stored in waveform memory obtained by sampling basic waveform AW over time at basic sampling interval TC, data is read out and supplied to the above mentioned interpolating circuit. Having been supplied to the interpolating circuit, the data values are then interpolated by the interpolating circuit therein, whereby theoretical sample data is obtained corresponding to sampling basic waveform AW at points on the time axis corresponding to multiples of regeneration sampling interval Tm.
As an example of this type of operation, as a first step, to determine the sample data corresponding to the single point W.sub.x1 on the time axis shown in FIG. 16(a), 6th order interpolation is carried out using the sample data correlating with points W.sub.-3, W.sub.-2, W.sub.-1, W.sub.0, W.sub.1, W.sub.2 and W.sub.3 on the time axis, where W.sub.-3, W.sub.-2, W.sub.-1 and W.sub.0 are the four multiples of basic sampling interval Tc immediately after W.sub.x1 with respect to time, and where W.sub.1, W.sub.2, W.sub.3 are the three multiples of basic sampling interval Tc immediately after W.sub.x1 with respect to time. The sample data corresponding to these points on the time axis are read out from waveform memory and supplied to the interpolating circuit.
In the interpolating circuit which is included as a component of the asynchronous waveform generating apparatus, for each of the seven points, a corresponding interpolation coefficient is calculated based on the phase difference x between W.sub.x1 and W.sub.0, after which the sample data for each point is multiplied its corresponding interpolation coefficient and the results thus obtained are summed, whereby the sample data corresponding to point W.sub.x1 is obtained. This process is then repeated to determine the sample data corresponding to the single point W.sub.x2 on the time axis, this time carrying the interpolating operation using the sample data correlating with points W.sub.-2, W.sub.-1, W.sub.0, W.sub.1, W.sub.2, W.sub.3 and W.sub.4 on the time axis, where W.sub.-2, W.sub.-1, W.sub.0 and W.sub.1 are the four multiples of basic sampling interval Tc immediately prior to W.sub.x2, and where W.sub.2, W.sub.3 and W.sub.4 are the three multiples of basic sampling interval Tc immediately after W.sub.x2. The interpolation process as thus described is repeated over and over, thereby determining sample data corresponding to W.sub.x1, W.sub.x2, W.sub.x3, W.sub.x4, W.sub.x5, . . . which are consecutive multiples of regeneration sampling interval Tm.
With each interpolating operation carried out as described above, six of the seven data used are also used in the following interpolation. Thus for example, of the sample data corresponding to W.sub.-3, W.sub.-2, W.sub.-1, W.sub.0, W.sub.1, W.sub.2 and W.sub.3 used to calculate the sample the sample data corresponding to W.sub.x1, the values corresponding to W.sub.-2, W.sub.-1, W.sub.0, W.sub.1, W.sub.2, and W.sub.3 will be used again in the next interpolation to calculate the sample data corresponding to W.sub.x2. For the purpose of efficiency, therefore, a control routine is provided through the operation of which, sample data from waveform memory is temporarily stored in registers and then used in successive calculations. In this way, after W.sub.x1 has been calculated, for example, to calculate the sample data corresponding to W.sub.x2, only sample data corresponding to W.sub.4 need be read out from waveform memory. For this reason, slower, less expensive memory devices can be successfully used for waveform memory.
When a waveform is to be regenerated having a pitch greater than one octave higher than that of the basic waveform AW, however, the requirements for high speed, fast access time memory devices cannot be so easily avoided by the above described method. As an example of such a case, in order to determine the sample data corresponding to point W.sub.y1 in FIG. 16(c), interpolation is carried out using the sample data stored in waveform memory for points W.sub.-3, W.sub.-2, W.sub.-1, W.sub.0, W.sub.1, W.sub.2 and W.sub.3. However, for the following interpolating operation, wherein the sample data corresponding to Wy.sub.2 is determined, interpolation is carried out using the sample data corresponding to W.sub.0, W.sub.1, W.sub.2, W.sub.3, W.sub.4, W.sub.5 and W.sub.6. Thus, only three sample data values utilized in the first interpolating operation can be employed in the following interpolating operation. When a waveform is to be regenerated having a pitch two, three or more octaves higher than that of basic waveform A, access speed requirements for waveform memory become very significant, thereby necessitating the use of expensive, short access time memory devices.
In the view of the fact that, other than for pitch bending simulation, there is seldom need for capability to regenerate waveforms having a pitch more than two octaves higher than that of basic waveform AW, ordinarily, expensive, short access time memory devices are not utilized for waveform memory in this type of conventional waveform generating apparatus. When it becomes necessary to regenerate waveforms having a pitch much higher than that of basic waveform AW, interpolating operations are carried out using only one out of each two or three sample data values stored in waveform memory, thereby lessening requirements for access time memory devices therein. With the example shown in FIG. 16(d), only those sample data values which are multiples of two times basic sampling interval Tc, as indicated by solid vertical lines, are utilized in the interpolating operations. In FIG. 16(e), the resulting waveform is shown, regenerated by outputting the result of each sequential interpolating operation at a rate given by basic sampling interval Tc. By using the above described method, even waveforms having a pitch much higher than that of basic waveform AW can be regenerated, even without the use of expensive, short access time memory devices in the waveform memory. An example of this type of conventional waveform generating apparatus has been disclosed in Japanese Patent Application, Second Publication No. 59-17838.
With this type of conventional waveform generating apparatus, in order to regenerate a basic waveform at a different pitch with high fidelity, relatively high order interpolating computations must be carried out. However, as the order of interpolating computations become great, the rate at which sample data must be supplied from waveform memory increases. For this reason, order of interpolation in limited by the access time of the memory devices utilized in waveform memory. Thus, for the reasons described above, with this type of conventional waveform generating apparatus, the ability to regenerate with high fidelity waveforms having a pitch much higher than that of the basic waveform is limited, unless expensive, short access time memory devices are employed in waveform memory.
Moreover, when decreasing waveform memory throughput requirements by the above described method of only using one sample data values out of every two or three for interpolating computations, there is a tendency for noise to be introduced into the regenerated waveform. In particular, when pitch bending operations are being carried out under the control of the individual operating the device, generally the ratio of the pitch of the regenerated waveform to that of the basic waveform varies in a linear manner. When the pitch corresponding to the regenerated waveform increases above a certain value, however, interpolating computations begin to skip one or two sample data values for every three such values as described above, for which reason a sudden change occurs in the spectrum of the regenerated waveform and the tone generated thereby, which is readily discernible by those listening.